import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { PartyMember } from 'libs/db/entity/party-member.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { PartyMemberCrudOps } from './party-member-crud-ops';
import { PartyMemberService } from './party-member.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(PartyMemberCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-web'))
@ApiBearerAuth()
@ApiTags('信息管理 - 党员发展')   //标签
@Controller('party-member')
export class PartyMemberController implements CrudController<PartyMember> {
  constructor(public service: PartyMemberService) {
  }
}
